-- GENERATED SPELL FOR [Rivendark] --


function spell0_23061(pUnit, Event) --@Bellowing Roar,Self--
pUnit:FullCastSpellOnTarget(36922,pUnit)
pUnit:RegisterEvent('Sorts_23061', 6500, 1)
end

function spell1_23061(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23061', 609, 1)
end

function spell2_23061(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(41988,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23061', 26000, 1)
end

function spell3_23061(pUnit, Event) --@Fiery Breath,n/a--
pUnit:FullCastSpellOnTarget(40032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23061', 681, 1)
end

function spell4_23061(pUnit, Event) --@Flame Breath,n/a--
pUnit:FullCastSpellOnTarget(9573,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23061', 2000, 1)
end

function spell5_23061(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(15847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23061', 570, 1)
end

function Sorts_23061(pUnit, Event)
local choix_sorts_23061 = math.random(0, 5)
if choix_sorts_23061 == 0 then
pUnit:RegisterEvent('spell0_23061', 1, 1)
end
if choix_sorts_23061 == 1 then
pUnit:RegisterEvent('spell1_23061', 1, 1)
end
if choix_sorts_23061 == 2 then
pUnit:RegisterEvent('spell2_23061', 1, 1)
end
if choix_sorts_23061 == 3 then
pUnit:RegisterEvent('spell3_23061', 1, 1)
end
if choix_sorts_23061 == 4 then
pUnit:RegisterEvent('spell4_23061', 1, 1)
end
if choix_sorts_23061 == 5 then
pUnit:RegisterEvent('spell5_23061', 1, 1)
end
end

function mob23061_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23061', math.random(1500, 3000), 1)
end

function mob23061_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23061_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23061_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23061, 1, 'mob23061_Action')
RegisterUnitEvent(23061, 2, 'mob23061_Leave')
RegisterUnitEvent(23061, 3, 'mob23061_Kill')
RegisterUnitEvent(23061, 4, 'mob23061_Die')
